package fristphase.day9_04.ooday06;

public class InnerAndOut {
    public static void main(String[] args) {
        MyOut Eoo = new MyOut();
        Eoo.create();
    }
}
class MyOut{
    private String name;
    MyInner Doo = new MyInner();
    void create(){
        Doo.show();
    }
    class MyInner{
        void show(){
            name = "张三";
            System.out.println("这是内部类");
            System.out.println("这是外部类的变量name:"+MyOut.this.name);//完整写法
            System.out.println(name);//简写
        }
    }
}
